package com.laopan.elasticsearch.bean;

/**
 * @author laopan
 * @className Page
 * @date 2021/4/20 14:26
 */

public class Page {
    private Integer pageSize;
    private Integer pageNum;
    public Page() {
    }

    public Page(Integer pageSize, Integer pageNum) {
        this.pageSize = pageSize;
        this.pageNum = pageNum;
    }

    public Page(Integer pageSize) {
        this.pageSize = pageSize;
    }
    public Integer getPageSize() {
        if (null == pageSize) {
            pageSize=10;
        }
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageNum() {
        if (null == pageNum) {
            pageNum=1;
        }
        return pageNum-1;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }


}
